﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpModelInterface.h"
#include "IExternalObject.h"

namespace gcmp
{
    class IDocument;
    SERIALIZABLE_ENUM_CLASS(PointType)
    {
        Dot = 0,                                       ///< 点
        Plus = 2,                                      ///< 加号+
        PlusCircle = 34                                ///< 加号与圆结合
    };

    /// \brief 点样式
    ///
    /// GCMP提供实现，不允许外部派生。
    FINAL_INTERFACE class GCMP_MODEL_INTERFACE_EXPORT IDrawingPointStyle : public IExternalObject
    {
        DEFINE_CAST_DERIVED(IDrawingPointStyle, IExternalObject);
    public:
        /// \brief 析构函数
        virtual ~IDrawingPointStyle();

        /// \brief 获得点样式
        ///
        /// \param pDocument 点样式所属的文档
        /// \return 点样式
        static IDrawingPointStyle* Get(IDocument* pDocument);

        /// \brief 设置点类型
        ///
        /// \param pointType 点类型
        /// \return bool 返回true表示设置成功，否则设置失败
        virtual bool SetPointType(PointType pointType) = 0;

        /// \brief 获得点类型
        ///
        /// \return PointType 点类型
        virtual PointType GetPointType() const = 0;

        /// \brief 设置点尺寸大小
        ///
        /// \param pointSize 点尺寸大小
        /// \return bool 返回true表示设置成功，否则设置失败
        virtual bool SetPointSize(double pointSize) = 0;

        /// \brief 获得点尺寸大小
        ///
        /// \return double 点尺寸大小
        virtual double GetPointSize() const = 0;

        /// \brief 设置点样式id
        ///
        /// \param styleId 样式id
        /// \return bool 返回true表示设置成功，否则设置失败
        virtual bool SetPointStyleId(const ElementId &styleId) = 0;

        /// \brief 获取点样式id
        ///
        /// \return styleId 样式id
        virtual ElementId GetPointStyleId() const = 0;
    };
}
